package vn.sms.lazylove;

import com.google.ads.h;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {
	
	Button btnContact, btnSettings,btnHelp,btnScheduledMessages,btnAbout,btnExit;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.layout_main);		
		btnSettings = (Button) findViewById(R.id.btn_settings);
		btnContact = (Button) findViewById(R.id.btn_contact);
		btnHelp = (Button) findViewById(R.id.btn_help);
		btnScheduledMessages = (Button) findViewById(R.id.btn_scheduled_messages);
		btnAbout = (Button) findViewById(R.id.btn_about);
		btnExit = (Button) findViewById(R.id.btn_exit);
		
		btnSettings.setOnClickListener(onbtnSettingsClickListener);
		btnContact.setOnClickListener(onbtnContactClickListener);
		btnHelp.setOnClickListener(onbtnHelpClickListener);
		btnScheduledMessages.setOnClickListener(onbtnScheduledMessagesClickListener);
		btnAbout.setOnClickListener(onbtnAboutClickListener);
		btnExit.setOnClickListener(onbtnExitClickListener);
	}

	OnClickListener onbtnSettingsClickListener = new OnClickListener() {

		public void onClick(View v) {
			Intent myIntent = new Intent(getApplicationContext(),
					CreateSmsActivity.class);			
			startActivity(myIntent);
		}
	};
	
	OnClickListener onbtnContactClickListener = new OnClickListener() {

		public void onClick(View v) {
			Intent myIntent = new Intent(getApplicationContext(),
					ContactActivity.class);			
			startActivity(myIntent);
		}
	};
	
	OnClickListener onbtnHelpClickListener = new OnClickListener() {

		public void onClick(View v) {
			Intent myIntent = new Intent(getApplicationContext(),
					HelperActivity.class);			
			startActivity(myIntent);
		}
	};
	
	OnClickListener onbtnScheduledMessagesClickListener = new OnClickListener() {

		public void onClick(View v) {
			Intent myIntent = new Intent(getApplicationContext(),
					SMSPatentActivity.class);			
			startActivity(myIntent);
		}
	};
	
	OnClickListener onbtnAboutClickListener = new OnClickListener() {

		public void onClick(View v) {
			Intent myIntent = new Intent(getApplicationContext(),
					AboutActivity.class);			
			startActivity(myIntent);
		}
	};
	
	OnClickListener onbtnExitClickListener = new OnClickListener() {

		public void onClick(View v) {
			finish();
		}
	};

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_helper, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.menu_exit:
			finish();
			break;		
		default:
			finish();
			break;
		}
		return true;
	}

	@Override
	protected void onResume() {
		super.onResume();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

}
